<%@ include file="../common/top.jsp"%>

<div id="Catalog">
  <form action="signOn" method="post">
    <p>Please enter your username and password.</p>
    <c:if test="${requestScope.signOnMsg != null}">
      <p> <font color="red">${requestScope.signOnMsg} </font> </p>
    </c:if>
    <p>
      Username:<input type="text" name="username"> <br/>
      Password:<input type="password" name="password"><br/>
      Captcha :<input type="text" name="captcha" id="captcha" required><br/>

      <img id="captchaImage" src="captcha" alt="Captcha Image">
      <a onclick="changeCode()">Can't see?</a>
      <script>
        function changeCode() {
          var captchaImage = document.getElementById("captchaImage");
          captchaImage.src = "captcha?" + new Date().getTime(); //使用新的时间戳作为查询参数来重新加载验证码图片
        }
      </script>

    </p>
    <input type="submit" value="Login">
  </form>
  Need a username and password?
  <a href="newAccountForm">Register Now!</a><!--跳转登录-->

</div>

<%@ include file="../common/bottom.jsp"%>